package day07;

/**
 * @author Xiao
 * @date 2021/7/8
 */
public class Phone {
    /**
     *      需求：
     *      定义手机类，手机有品牌(brand),价格(price)和颜色(color)三个属性，
     *      有打电话call()和sendMessage()两个功能。
     */
    private String brand;
    private int price;
    private String color;
    public void call () {
        System.out.println("正在使用价格为" + this.price + "元的" + this.color + this.brand + "手机打电话……");
    }public void sendMessage () {
        System.out.println("正在使用价格为" + this.price + "元的" + this.color + this.brand + "手机发短信……");
    }
    public Phone(){}
    public Phone(String brand, int price, String color){
        this.brand = brand;
        this.price = price;
        this.color = color;
    }
    public void setBrand(String brand){
        this.brand = brand;
    }
    public String getBrand(){
        return brand;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }
}
